package com.cg.train.service;

import com.cg.system.entity.PageBean;
import com.cg.train.entity.Train;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

public interface TrainService {
    void add(Train train);
//  条件分页列表查询
    PageBean<Train> list(Integer pageNum, Integer pageSize, String projectCode, String trainingProject);

    // 使用自定义的cacheManager
    @Cacheable(value = "trainDetail", key = "#projectId", unless = "#result == null", cacheManager = "cacheManager")
    Train detail(Integer projectId);

    void delete(Integer id);

    void update(Train train);
}
